﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Form1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        
        TimKiemThongKeController hhctrl = new TimKiemThongKeController();
        TimKiemData datatk = new TimKiemData();
        private void btn_TimKiem_Click(object sender, EventArgs e)
        {
            DataTable tb = hhctrl.xulytimkiem(txt_MaHang.Text, cmb_1.Text, txt_MatHang.Text, cmb_2.Text, txt_DonViTinh.Text);
            BindingSource bs = new BindingSource();
            bs.DataSource = tb;
            dgv.DataSource = bs;
            bn.BindingSource = bs;
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            cmb_1.SelectedIndex = 0;
            cmb_2.SelectedIndex = 0;
        }

    }
}
